package com.example.mysimpleexample.fragment;

import android.content.Intent;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView;

import com.example.mysimpleexample.activity.BottomSheetFragmentActivity;
import com.example.mysimpleexample.activity.ImagePickerActivity;
import com.example.mysimpleexample.activity.MenuActivity;
import com.example.mysimpleexample.activity.PickerActivity;
import com.xuexiang.xpage.annotation.Page;
import com.xuexiang.xpage.base.XPageContainerListFragment;
import com.xuexiang.xpage.base.XPageListFragment;
import com.xuexiang.xpage.base.XPageSimpleListFragment;

import java.util.List;

@Page(name = "底部滑出面板")
public class BottomSheetFragment extends XPageSimpleListFragment {
    @Override
    protected List<String> initSimpleData(List<String> lists) {
        lists.add("Intent Picker");
        lists.add("Intent Menu");
        lists.add("Image Picker");
        lists.add("BottomSheetFragment");
        return lists;
    }

    @Override
    protected void onItemClick(int position) {
        switch (position) {
            case 0:
                Intent pickerIntent = new Intent(getActivity(), PickerActivity.class);
                startActivity(pickerIntent);
                break;
            case 1:
                Intent menuIntent = new Intent(getActivity(), MenuActivity.class);
                startActivity(menuIntent);
                break;
            case 2:
                Intent imagePickerIntent = new Intent(getActivity(), ImagePickerActivity.class);
                startActivity(imagePickerIntent);
                break;
            case 3:
                Intent fragmentIntent = new Intent(getActivity(), BottomSheetFragmentActivity.class);
                startActivity(fragmentIntent);
                break;
            default:
                break;
        }
    }
}
